<?php

namespace app\admin\validate\shop\market\recharge;

use think\Validate;

class Plan extends Validate
{
    protected $failException = true;

    /**
     * 验证规则
     */
    protected $rule = [
        'name'  => 'require',
        'money' => 'require|min:0.01',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'name.require'  => '套餐名称不能为空',
        'money.require' => '充值金额不能为空',
        'money.min'     => '充值金额不能小于0.01'
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name', 'money'],
        'edit' => ['name', 'money'],
    ];

}
